import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

/** pour faire un menu*/
	class Menu extends JMenuBar
	{
		private JMenu fichier = new JMenu("Fichier");
		private JMenu configurer = new JMenu("configurer");
		private JMenu aide = new JMenu("?");
		
		private JMenuItem nouveau = new JMenuItem("Nouveau");
		private JMenuItem fermer = new JMenuItem("Quitter");
		private JMenuItem config1 = new JMenuItem("Joueur");
		private JMenuItem config2 = new JMenuItem("Mise");
		private JMenuItem config3 = new JMenuItem("Deck");
		private JMenuItem config4 = new JMenuItem("Adversaire");
		private JMenuItem question = new JMenuItem("Aide");
		
		public Menu(StartWindows windows)
		{
			fichier.add(nouveau);
			fichier.addSeparator();
			fermer.addActionListener(new ActionListener(){
				public void actionPerformed(ActionEvent arg0) {
					System.exit(0);
				}				
			});
			fichier.add(fermer);
			config1.addActionListener(new ActionListener(){
				public void actionPerformed(ActionEvent arg0) {
					windows.configurer1();
				}				
			});
			config2.addActionListener(new ActionListener(){
				public void actionPerformed(ActionEvent arg0) {
					windows.configurer2();
				}				
			});
			config3.addActionListener(new ActionListener(){
				public void actionPerformed(ActionEvent arg0) {
					windows.configurer3();
				}				
			});
			config4.addActionListener(new ActionListener(){
				public void actionPerformed(ActionEvent arg0) {
					windows.configurer4();
				}				
			});
			configurer.add(config1);
			configurer.add(config2);
			configurer.add(config3);
			configurer.add(config4);
			
			aide.add(question);
			this.add(fichier);
			this.add(configurer);
			this.add(aide);
		}
	}